package com.csce.domain.entity.score;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.doudou.core.date.DateUtil;
import com.osce.common.core.entity.BaseEntity;
import lombok.*;

import java.util.Date;

/**
 * 考试时间段对象 score_ex_exam_time
 *
 * @author zzx
 * @since 2023-09-05
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
@ToString
@EqualsAndHashCode(callSuper = true)
public class ScoreExExamTime extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 考试编号
     */
    private Long examId;

    /**
     * 名称
     */
    private String name;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "HH:mm:ss")
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "HH:mm:ss")
    private Date endTime;

    public String getStartTimeStr() {
        return DateUtil.formatTime(this.startTime);
    }

    public String getEndTimeStr() {
        return DateUtil.formatTime(this.endTime);
    }
}
